import request from '@/utils/request'

// 新建文件夹
export function insertFolder(data) {
  return request({
    url: 'folder/insertFolder',
    method: 'post',
    data
  })
}

// 获取文件列表
export function getFolder() {
  return request({
    url: 'folder/getFolder',
    method: 'get'
  })
}

// 文件夹修改角色分配
export function updateAssign(data) {
  return request({
    url: 'folder/updateAssign',
    method: 'post',
    data
  })
}

export function selectFileLog(data) {
  return request({
    url: 'folder/selectFileLog',
    method: 'post',
    data
  })
}

// 查询当前文件夹所拥有的角色
export function selectRoles(data) {
  return request({
    url: 'folder/selectRoles',
    method: 'post',
    data
  })
}

// 打开目录
export function openDirectory(data) {
  return request({
    url: 'folder/openDirectory',
    method: 'post',
    data
  })
}

// 返回上一级
export function backUpDirectory(data) {
  return request({
    url: 'folder/backUpDirectory',
    method: 'post',
    data
  })
}

// 上传文件
export function insertFile(data) {
  return request({
    url: '/folder/insertFile',
    method: 'post',
    data
  })
}

// 修改文件名
export function updateFileName(data) {
  return request({
    url: '/folder/updateFileName',
    method: 'post',
    data
  })
}

// 删除文件
export function deleteFolder(data) {
  return request({
    url: '/folder/deleteFolder',
    method: 'post',
    data
  })
}

export function requestURL(data) {
  return request({
    url: '/folder/requestURL',
    method: 'post',
    data
  })
}

export function analysisExcel(data) {
  return request({
    url: '/folder/analysisExcel',
    method: 'post',
    data
  })
}

export function uploadWord(data) {
  return request({
    url: '/folder/uploadWord',
    method: 'post',
    data
  })
}

// 获取word协议
export function getWordList() {
  return request({
    url: '/folder/getWordList',
    method: 'get'
  })
}
